//
//  HomeGoodsTypeModel.m
//  Shengzhuli
//
//  Created by FXGuo on 2017/5/17.
//  Copyright © 2017年 kamangkeji. All rights reserved.
//

#import "HomeGoodsTypeModel.h"

@implementation HomeGoodsTypeModel

- (instancetype)initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        self.ID = [dict[@"id"] integerValue];
        self.productTypeImage = dict[@"productTypeImage"];
        self.productTypeName = dict[@"productTypeName"];
        self.describes = dict[@"describes"];
        NSMutableArray *arr = [NSMutableArray array];
        for (NSDictionary *subDict in dict[@"typeList"]) {
            HomeGoodsTypeModel *model = [HomeGoodsTypeModel objectWithDict:subDict];
            [arr addObject:model];
        }
        self.typeList = arr;
    }
    return self;
}

+ (instancetype)objectWithDict:(NSDictionary *)dict
{
    return [[HomeGoodsTypeModel alloc]initWithDict:dict];
}

@end
